

package com.hazelcast.internal.config;

import com.hazelcast.config.JavaSerializationFilterConfig;
import com.hazelcast.config.UserCodeNamespaceConfig;
import com.hazelcast.config.UserCodeNamespacesConfig;

import javax.annotation.Nullable;

public class UserCodeNamespacesConfigReadOnly extends UserCodeNamespacesConfig {

    public UserCodeNamespacesConfigReadOnly(UserCodeNamespacesConfig config) {
        super(config);
    }

    @Override
    public UserCodeNamespacesConfig setEnabled(boolean enabled) {
        throw new UnsupportedOperationException("This config is read-only name-spaces");
    }

    @Override
    public UserCodeNamespacesConfig addNamespaceConfig(UserCodeNamespaceConfig userCodeNamespaceConfig) {
        throw new UnsupportedOperationException("This config is read-only name-spaces");
    }

    @Override
    public UserCodeNamespacesConfig removeNamespaceConfig(String namespace) {
        throw new UnsupportedOperationException("This config is read-only name-spaces");
    }

    @Override
    public void setClassFilterConfig(@Nullable JavaSerializationFilterConfig classFilterConfig) {
        throw new UnsupportedOperationException("This config is read-only name-spaces");
    }
}
